#!/usr/bin/perl

foreach $file (@ARGV){
	if(open(FILE, "<$file")){
		$line = <FILE>;
		unless($line =~ m/^success/){
			failed();
		}
		close(FILE);
	}else{
		failed();
	}
}
success();

exit(0);

sub success {
	print "success.\n";
	exit(0);
}
sub failed {
	print "failed.\n";
	exit(0);
}
